package com.breadenglish.cms.api.app.dao.impl;

import com.breadenglish.cms.api.app.dao.WordDetailDao;
import com.breadenglish.cms.api.app.domain.db.WordDetail;
import com.breadenglish.cms.api.app.mapper.WordDetailMapper;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;


/**
 * WordDetail
 * <p>
 * User: guoyao
 * DateTime: 2015-12-22 20:06:38
 */
@Service("wordDetailDao")
public class WordDetailDaoImpl implements WordDetailDao {

    @Resource
    private WordDetailMapper wordDetailMapper;

    /**
     * 根据主键查询WordDetail对象
     *
     * @param wordDetailId
     * @return WordDetail对象
     */
    @Override
    public WordDetail selectByPrimaryKey(Long wordDetailId) {
        return wordDetailMapper.selectByPrimaryKey(wordDetailId);
    }

    /**
     * 根据查询条件查询符合条件的WordDetail对象
     *
     * @param wordDetail
     * @return 符合条件的WordDetail对象List
     */
    @Override
    public List<WordDetail> select(WordDetail wordDetail) {
        return wordDetailMapper.select(wordDetail);
    }

    /**
     * 根据主键删除WordDetail对象
     *
     * @param wordDetailId
     * @return 影响条件数
     */
    @Override
    public int deleteByPrimaryKey(Long wordDetailId) {
        return wordDetailMapper.deleteByPrimaryKey(wordDetailId);
    }

    /**
     * 根据条件删除符合条件的WordDetail对象
     *
     * @param wordDetail
     * @return 影响条件数
     */
    @Override
    public int delete(WordDetail wordDetail) {
        return wordDetailMapper.delete(wordDetail);
    }

    /**
     * 插入WordDetail对象
     *
     * @param wordDetail
     * @return 影响条件数
     */
    @Override
    public int insert(WordDetail wordDetail) {
        return wordDetailMapper.insert(wordDetail);
    }

    /**
     * 更新WordDetail对象
     *
     * @param wordDetail
     * @return 影响条件数
     */
    @Override
    public int update(WordDetail wordDetail) {
        return wordDetailMapper.update(wordDetail);
    }
}
